using System;

namespace CastleSample.UI.Core
{
    public interface IEventBroker
    {
        /// <summary>
        /// Register a handler to a named event.
        /// </summary>
        void RegisterEventHandler(string key, EventHandler<ContainerEventArgs> handler);

        /// <summary>
        /// Register a async handler to a named event.
        /// </summary>
        void RegisterAsyncEventHandler(string key, EventHandler<ContainerEventArgs> handler);

        /// <summary>
        /// Publish a event
        /// </summary>
        void PublishEvent(string key, object sender, ContainerEventArgs arg);
    }
}